import Vuex from 'vuex'
import Vue from 'vue'

Vue.use(Vuex);
// 
let userInfo=JSON.parse(localStorage.getItem("userInfo"))
const store=new Vuex.Store({
    state: {
        userInfo:userInfo
    },
    getters: {
        
    },
    mutations: {
        saveUserInfo(state,payload){
            state.userInfo=payload;
            localStorage.setItem("userInfo",JSON.stringify(payload))
        }
    },
    actions: {
        
    }
})
export default store